package com.publicize.controller;


import com.publicize.commom.commonutils.Result;
import com.publicize.entity.Examination;
import com.publicize.service.ExaminationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 知识竞赛测试表 前端控制器
 * </p>
 *
 * @author bs
 * @since 2021-03-10
 */
@CrossOrigin
@RestController
@RequestMapping("/competition/examination")
public class ExaminationController {
    @Autowired
    ExaminationService examinationService;
    @GetMapping
    public Result queryAll(){
        List<Examination> record=examinationService.list(null);
        return Result.ok().data("examination",record);
    }

}

